home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / Think C QuickTime Interfaces / TC QuickTime.sit / TC QuickTime / ImageCompression.h < prev    next >
Text File  |  1994-03-22  |  23KB  |  775 lines

  1. /************************************************************
  2.  
  3. Created: Tuesday, June 8, 1993 at 3:10 PM
  4.  ImageCompression.h
  5.  C Interface to the Macintosh Libraries
  6.  
  7.  Copyright Apple Computer, Inc. 1991, 1992
  8.  All rights reserved
  9.  
  10. ************************************************************/
  11.  
  12. #pragma once
  13.  
  14. #ifndef __IMAGECOMPRESSION__
  15. #define __IMAGECOMPRESSION__
  16. #ifndef __QUICKDRAW__
  17. #include <QuickDraw.h>
  18. #endif
  19.  
  20. #ifndef __QDOFFSCREEN__
  21. #include <QDOffscreen.h>
  22. #endif
  23.  
  24. #ifndef __TYPES__
  25. #include <Types.h>
  26. #endif
  27.  
  28. #ifndef __COMPONENTS__
  29. #include <Components.h>
  30. #endif
  31.  
  32. #ifndef __STANDARDFILE__
  33. #include <StandardFile.h>
  34. #endif
  35.  
  36.  
  37. #define gestaltCompressionMgr 'icmp'
  38.  
  39.  
  40. struct MatrixRecord {
  41.     Fixed matrix[3][3];
  42. };
  43.  
  44. typedef struct MatrixRecord MatrixRecord;
  45. typedef MatrixRecord *MatrixRecordPtr;
  46.  
  47. typedef struct FixedPoint {
  48.     Fixed x;
  49.     Fixed y;
  50. } FixedPoint;
  51.  
  52. typedef struct FixedRect {
  53.     Fixed left;
  54.     Fixed top;
  55.     Fixed right;
  56.     Fixed bottom;
  57. } FixedRect;
  58.  
  59.  
  60. #define    codecInfoDoes1                (1L<<0)
  61. #define    codecInfoDoes2                (1L<<1)
  62. #define    codecInfoDoes4                (1L<<2)
  63. #define    codecInfoDoes8                (1L<<3)
  64. #define    codecInfoDoes16                (1L<<4)
  65. #define    codecInfoDoes32                (1L<<5)
  66. #define    codecInfoDoesDither            (1L<<6)
  67. #define    codecInfoDoesStretch        (1L<<7)
  68. #define    codecInfoDoesShrink            (1L<<8)
  69. #define    codecInfoDoesMask            (1L<<9)
  70.  
  71. #define    codecInfoDoesTemporal        (1L<<10)
  72.  
  73. #define    codecInfoDoesDouble            (1L<<11)
  74. #define    codecInfoDoesQuad            (1L<<12)
  75. #define    codecInfoDoesHalf            (1L<<13)
  76. #define    codecInfoDoesQuarter        (1L<<14)
  77.  
  78. #define    codecInfoDoesRotate            (1L<<15)
  79. #define    codecInfoDoesHorizFlip        (1L<<16)
  80. #define    codecInfoDoesVertFlip        (1L<<17)
  81. #define    codecInfoDoesSkew            (1L<<18)
  82. #define    codecInfoDoesBlend            (1L<<19)
  83. #define    codecInfoDoesWarp            (1L<<20)
  84. #define    codecInfoDoesRecompress        (1L<<21)
  85. #define    codecInfoDoesSpool            (1L<<22)
  86. #define    codecInfoDoesRateConstrain    (1L<<23)
  87.  
  88. #define    codecInfoDepth1                (1L<<0)
  89. #define    codecInfoDepth2                (1L<<1)
  90. #define    codecInfoDepth4                (1L<<2)
  91. #define    codecInfoDepth8                (1L<<3)
  92. #define    codecInfoDepth16            (1L<<4)
  93. #define    codecInfoDepth32            (1L<<5)
  94. #define    codecInfoDepth24            (1L<<6)
  95. #define    codecInfoDepth33            (1L<<7)
  96. #define    codecInfoDepth34            (1L<<8)
  97. #define    codecInfoDepth36            (1L<<9)
  98. #define    codecInfoDepth40            (1L<<10)
  99. #define    codecInfoStoresClut            (1L<<11)
  100. #define    codecInfoDoesLossless        (1L<<12)
  101. #define    codecInfoSequenceSensitive    (1L<<13)
  102.  
  103. #define    codecFlagUseImageBuffer        (1L<<0)
  104. #define    codecFlagUseScreenBuffer    (1L<<1)
  105. #define    codecFlagUpdatePrevious        (1L<<2)
  106. #define    codecFlagNoScreenUpdate        (1L<<3)
  107. #define    codecFlagWasCompressed        (1L<<4)
  108. #define    codecFlagDontOffscreen        (1L<<5)
  109. #define    codecFlagUpdatePreviousComp    (1L<<6)
  110. #define    codecFlagForceKeyFrame        (1L<<7)
  111. #define    codecFlagOnlyScreenUpdate    (1L<<8)
  112. #define    codecFlagLiveGrab            (1L<<9)
  113. #define    codecFlagDontUseNewImageBuffer (1L<<10)
  114. #define    codecFlagInterlaceUpdate     (1L<<11)
  115.  
  116.  
  117. #define    codecFlagUsedNewImageBuffer    (1L<<14)
  118. #define    codecFlagUsedImageBuffer    (1L<<15)
  119.  
  120. #define    codecErr                    -8960
  121. #define    noCodecErr                    -8961
  122. #define    codecUnimpErr                -8962
  123. #define    codecSizeErr                -8963
  124. #define    codecScreenBufErr            -8964
  125. #define    codecImageBufErr            -8965
  126. #define    codecSpoolErr                -8966
  127. #define    codecAbortErr                -8967
  128. #define    codecWouldOffscreenErr        -8968
  129. #define    codecBadDataErr                -8969
  130. #define    codecDataVersErr            -8970
  131. #define    codecExtensionNotFoundErr    -8971
  132. #define    codecConditionErr            -8972
  133. #define    codecOpenErr                -8973
  134. #define    codecMinimumDataSize        32768
  135.  
  136. #define    compressorComponentType            'imco'
  137. #define    decompressorComponentType        'imdc'
  138.  
  139. typedef    Component        CompressorComponent;
  140. typedef    Component        DecompressorComponent;
  141. typedef    Component        CodecComponent;
  142.  
  143. #define    anyCodec                ((CodecComponent)0)
  144. #define    bestSpeedCodec            ((CodecComponent)-1)
  145. #define    bestFidelityCodec        ((CodecComponent)-2)
  146. #define    bestCompressionCodec    ((CodecComponent)-3)
  147.  
  148. typedef    long        CodecType;
  149.  
  150. typedef    unsigned short    CodecFlags;
  151.  
  152. typedef    unsigned long    CodecQ;
  153.  
  154. #define    codecLosslessQuality        0x400L
  155. #define    codecMaxQuality                0x3ffL
  156. #define    codecMinQuality                0x000L
  157. #define    codecLowQuality                0x100L
  158. #define    codecNormalQuality            0x200L
  159. #define    codecHighQuality            0x300L
  160.  
  161. typedef pascal OSErr (*DataProcPtr)(Ptr *dataP,long bytesNeeded,long refcon);
  162.  
  163. typedef pascal OSErr (*FlushProcPtr)(Ptr data,long bytesAdded,long refcon);
  164.  
  165. typedef pascal void (*CompletionProcPtr)(OSErr result,short flags,long refcon);
  166.  
  167. #define    codecCompletionSource        (1<<0)
  168. #define    codecCompletionDest            (1<<1)
  169.  
  170. typedef pascal OSErr (*ProgressProcPtr)(short message,Fixed completeness,long refcon);
  171.  
  172. #define    codecProgressOpen            0
  173. #define    codecProgressUpdatePercent    1
  174. #define    codecProgressClose            2
  175.  
  176. typedef pascal void (*StdPixProcPtr)(PixMap *src,Rect *srcRect,MatrixRecord *matrix,short mode,
  177.     RgnHandle mask,PixMap *matte,Rect *matteRect,short flags);
  178.  
  179. typedef    long ImageSequence;
  180.  
  181. typedef    struct {
  182.     ProgressProcPtr    progressProc;
  183.     long            progressRefCon;
  184. } ProgressProcRecord;
  185.  
  186. typedef    ProgressProcRecord    *ProgressProcRecordPtr;
  187.  
  188. typedef    struct {
  189.     CompletionProcPtr    completionProc;
  190.     long                completionRefCon;
  191. } CompletionProcRecord;
  192.  
  193. typedef    CompletionProcRecord    *CompletionProcRecordPtr;
  194.  
  195. typedef    struct {
  196.     DataProcPtr        dataProc;
  197.     long            dataRefCon;
  198. } DataProcRecord;
  199.  
  200. typedef    DataProcRecord    *DataProcRecordPtr;
  201.  
  202. typedef    struct {
  203.     FlushProcPtr    flushProc;
  204.     long            flushRefCon;
  205. } FlushProcRecord;
  206.  
  207. typedef    FlushProcRecord    *FlushProcRecordPtr;
  208.  
  209. typedef pascal void (*AlignmentProcPtr)(Rect *rp, long refcon);
  210.  
  211. typedef    struct {
  212.     AlignmentProcPtr    alignmentProc;
  213.     long                alignmentRefCon;
  214. } AlignmentProcRecord;
  215.  
  216. typedef    AlignmentProcRecord    *AlignmentProcRecordPtr;
  217.  
  218. typedef struct {
  219.     long    dataRate;
  220.     long    dataOverrun;
  221.     long    frameDuration;
  222.     long    keyFrameRate;
  223.     CodecQ    minSpatialQuality;
  224.     CodecQ    minTemporalQuality;
  225. } DataRateParams;
  226.  
  227. typedef     DataRateParams *DataRateParamsPtr;
  228.  
  229. typedef struct ImageDescription {
  230.     long        idSize;
  231.     CodecType    cType;
  232.     long        resvd1;
  233.     short        resvd2;
  234.     short        dataRefIndex;
  235.     short        version;
  236.     short        revisionLevel;
  237.     long        vendor;
  238.     CodecQ        temporalQuality;
  239.     CodecQ        spatialQuality;
  240.     short        width;
  241.     short        height;
  242.     Fixed        hRes;
  243.     Fixed        vRes;
  244.     long        dataSize;
  245.     short        frameCount;
  246.     Str31        name;
  247.     short        depth;
  248.     short        clutID;
  249. } ImageDescription;
  250.  
  251. typedef    ImageDescription    *ImageDescriptionPtr;
  252.  
  253. typedef    ImageDescription    **ImageDescriptionHandle;
  254.  
  255. typedef struct CodecInfo {
  256.     Str31             typeName;
  257.     short            version;
  258.     short            revisionLevel;
  259.     long            vendor;
  260.     long             decompressFlags;
  261.     long             compressFlags;
  262.     long             formatFlags;
  263.     unsigned char    compressionAccuracy;
  264.     unsigned char    decompressionAccuracy;
  265.     unsigned short    compressionSpeed;
  266.     unsigned short    decompressionSpeed;
  267.     unsigned char    compressionLevel;
  268.     char            resvd;
  269.     short            minimumHeight;
  270.     short            minimumWidth;
  271.     short            decompressPipelineLatency;
  272.     short            compressPipelineLatency;
  273.     long            privateData;
  274. } CodecInfo;
  275.  
  276. typedef    struct {
  277.     CodecComponent        codec;
  278.     CodecType        cType;
  279.     Str31            typeName;
  280.     Handle            name;
  281. } CodecNameSpec;
  282.  
  283. typedef    struct {
  284.     short            count;
  285.     CodecNameSpec    list[1];
  286. }CodecNameSpecList;
  287.  
  288. typedef    CodecNameSpecList *CodecNameSpecListPtr;
  289.  
  290. #define    defaultDither        0
  291. #define    forceDither            1
  292. #define    suppressDither        2
  293. #define    useColorMatching    4
  294.  
  295. #ifdef __cplusplus
  296. extern "C" {
  297. #endif /*__cplusplus*/
  298.  
  299. pascal    OSErr
  300. CodecManagerVersion(long *version)
  301.     = {0x7000,0xAAA3};
  302.     
  303. pascal OSErr
  304. GetCodecNameList(CodecNameSpecListPtr *list,short showAll)
  305.     = {0x7001,0xAAA3};
  306.  
  307. pascal OSErr
  308. DisposeCodecNameList(CodecNameSpecListPtr list)
  309.     = {0x700F,0xAAA3};
  310.  
  311. pascal    OSErr
  312. GetCodecInfo(CodecInfo *info,CodecType cType,CodecComponent codec)
  313.     = {0x7003,0xAAA3};
  314.  
  315. pascal OSErr
  316. GetMaxCompressionSize(PixMapHandle src,const Rect *srcRect, short colorDepth,CodecQ quality,
  317.         CodecType cType,CompressorComponent codec,long *size)
  318.     = {0x7004,0xAAA3};
  319.  
  320. pascal OSErr
  321. GetCompressionTime(PixMapHandle src,const Rect *srcRect, short colorDepth,
  322.         CodecType cType,CompressorComponent codec,
  323.         CodecQ *spatialQuality,CodecQ *temporalQuality,unsigned long *compressTime)
  324.     = {0x7005,0xAAA3};
  325.  
  326. pascal OSErr
  327. CompressImage(PixMapHandle src,const Rect *srcRect,CodecQ quality,CodecType cType,
  328.         ImageDescriptionHandle desc,Ptr data)
  329.     = {0x7006,0xAAA3};
  330.  
  331. pascal OSErr
  332. FCompressImage(PixMapHandle src,const Rect *srcRect, short colorDepth,
  333.         CodecQ quality,CodecType cType,CompressorComponent codec,CTabHandle clut,
  334.         CodecFlags flags,long bufferSize,
  335.         FlushProcRecordPtr flushProc,ProgressProcRecordPtr progressProc, ImageDescriptionHandle desc,Ptr data)
  336.     = {0x7007,0xAAA3};
  337.  
  338. pascal OSErr
  339. DecompressImage(Ptr data,ImageDescriptionHandle desc,PixMapHandle dst,
  340.         const Rect *srcRect,const Rect *dstRect,short mode,RgnHandle mask)
  341.     = {0x7008,0xAAA3};
  342.  
  343. pascal OSErr
  344. FDecompressImage(Ptr data,ImageDescriptionHandle desc,PixMapHandle dst,const Rect *srcRect,
  345.         MatrixRecordPtr matrix,short mode,RgnHandle mask,
  346.         PixMapHandle matte,const Rect *matteRect,
  347.         CodecQ accuracy,DecompressorComponent codec,
  348.         long bufferSize,DataProcRecordPtr dataProc,ProgressProcRecordPtr progressProc)
  349.     = {0x7009,0xAAA3};
  350.  
  351. pascal OSErr
  352. CompressSequenceBegin(ImageSequence *seqID,PixMapHandle src,PixMapHandle prev,
  353.         const Rect *srcRect,const Rect *prevRect,short colorDepth,CodecType cType,CompressorComponent codec,
  354.         CodecQ spatialQuality,CodecQ temporalQuality,long keyFrameRate,
  355.         CTabHandle clut,CodecFlags flags,ImageDescriptionHandle desc)
  356.     = {0x700A,0xAAA3};
  357.  
  358. pascal OSErr
  359. CompressSequenceFrame(ImageSequence seqID,PixMapHandle src,const Rect *srcRect,
  360.         CodecFlags flags,Ptr data,long *dataSize,
  361.         unsigned char *similarity,CompletionProcRecordPtr asyncCompletionProc)
  362.     = {0x700B,0xAAA3};
  363.  
  364. pascal OSErr
  365. DecompressSequenceBegin(ImageSequence *seqID,ImageDescriptionHandle desc,
  366.         CGrafPtr port,GDHandle gdh,const Rect *srcRect,MatrixRecordPtr matrix,
  367.         short mode,RgnHandle mask,CodecFlags flags,CodecQ accuracy,DecompressorComponent codec)
  368.     = {0x700D,0xAAA3};
  369.  
  370. pascal OSErr
  371. DecompressSequenceBeginS(ImageSequence *seqID,ImageDescriptionHandle desc,Ptr data,long dataSize,
  372.         CGrafPtr port,GDHandle gdh,const Rect *srcRect,MatrixRecordPtr matrix,
  373.         short mode,RgnHandle mask,CodecFlags flags,CodecQ accuracy,DecompressorComponent codec)
  374.     = {0x203C,0x30,0x5D,0xAAA3};
  375.  
  376. pascal OSErr
  377. DecompressSequenceFrame(ImageSequence seqID,Ptr data,
  378.         CodecFlags inFlags,CodecFlags *outFlags,CompletionProcRecordPtr asyncCompletionProc)
  379.     = {0x700E,0xAAA3};
  380.  
  381. pascal OSErr
  382. DecompressSequenceFrameS(ImageSequence seqID,Ptr data,long dataSize,
  383.         CodecFlags inFlags,CodecFlags *outFlags,CompletionProcRecordPtr asyncCompletionProc)
  384.     = {0x203C,0x16,0x47,0xAAA3};
  385.  
  386. pascal OSErr
  387. SetDSequenceMatrix(ImageSequence seqID,MatrixRecordPtr matrix)
  388.     = {0x7010,0xAAA3};
  389.  
  390. pascal OSErr
  391. SetDSequenceMatte(ImageSequence seqID,PixMapHandle matte,const Rect *matteRect)
  392.     = {0x7011,0xAAA3};
  393.  
  394. pascal OSErr
  395. SetDSequenceMask(ImageSequence seqID,RgnHandle mask)
  396.     = {0x7012,0xAAA3};
  397.  
  398. pascal OSErr
  399. SetDSequenceTransferMode(ImageSequence seqID,short mode,const RGBColor *opColor)
  400.     = {0x7013,0xAAA3};
  401.  
  402. pascal OSErr
  403. SetDSequenceDataProc(ImageSequence seqID,DataProcRecordPtr dataProc,long bufferSize)
  404.     = {0x7014,0xAAA3};
  405.  
  406. pascal OSErr
  407. SetDSequenceAccuracy(ImageSequence seqID,CodecQ accuracy)
  408.     = {0x7034,0xAAA3};
  409.  
  410. pascal OSErr
  411. SetDSequenceSrcRect(ImageSequence seqID,const Rect *srcRect)
  412.     = {0x7035,0xAAA3};
  413.  
  414. pascal OSErr
  415. GetDSequenceImageBuffer(ImageSequence seqID,GWorldPtr *gworld)
  416.     = {0x7015,0xAAA3};
  417.  
  418. pascal OSErr
  419. GetDSequenceScreenBuffer(ImageSequence seqID,GWorldPtr *gworld)
  420.     = {0x7016,0xAAA3};
  421.  
  422. pascal OSErr
  423. SetCSequenceQuality(ImageSequence seqID,CodecQ spatialQuality,CodecQ temporalQuality)
  424.     = {0x7017,0xAAA3};
  425.  
  426. pascal OSErr
  427. SetCSequencePrev(ImageSequence seqID,PixMapHandle prev,const Rect *prevRect)
  428.     = {0x7018,0xAAA3};
  429.  
  430. pascal OSErr
  431. SetCSequenceFlushProc(ImageSequence seqID,FlushProcRecordPtr flushProc,long bufferSize)
  432.     = {0x7033,0xAAA3};
  433.  
  434. pascal OSErr
  435. SetCSequenceKeyFrameRate(ImageSequence seqID,long keyframerate)
  436.     = {0x7036,0xAAA3};
  437.  
  438. pascal OSErr
  439. GetCSequenceKeyFrameRate(ImageSequence seqID,long *keyframerate)
  440.     = {0x203C,0x8,0x4B,0xAAA3};
  441.  
  442. pascal OSErr
  443. GetCSequencePrevBuffer(ImageSequence seqID,GWorldPtr *gworld)
  444.     = {0x7019,0xAAA3};
  445.  
  446. pascal OSErr
  447. CDSequenceBusy(ImageSequence seqID)
  448.     = {0x701A,0xAAA3};
  449.  
  450. pascal OSErr
  451. CDSequenceEnd(ImageSequence seqID)
  452.     = {0x701B,0xAAA3};
  453.  
  454. pascal OSErr
  455. GetCompressedImageSize(ImageDescriptionHandle desc,Ptr data,long bufferSize,
  456.         DataProcRecordPtr dataProc,long *dataSize)
  457.     = {0x701C,0xAAA3};
  458.  
  459. pascal OSErr
  460. GetSimilarity(PixMapHandle src,const Rect *srcRect,ImageDescriptionHandle desc,Ptr data,Fixed *similarity)
  461.     = {0x701D,0xAAA3};
  462.  
  463. pascal OSErr
  464. GetImageDescriptionCTable(ImageDescriptionHandle desc,CTabHandle *ctable)
  465.     = {0x701E,0xAAA3};
  466.  
  467. pascal OSErr
  468. SetImageDescriptionCTable(ImageDescriptionHandle desc,CTabHandle ctable)
  469.     = {0x701F,0xAAA3};
  470.  
  471. pascal OSErr
  472. GetImageDescriptionExtension(ImageDescriptionHandle desc,Handle *extension,long type,long index)
  473.     = {0x7020,0xAAA3};
  474.  
  475. pascal OSErr
  476. SetImageDescriptionExtension(ImageDescriptionHandle desc,Handle extension, long type)
  477.     = {0x7021,0xAAA3};
  478.  
  479. pascal OSErr
  480. RemoveImageDescriptionExtension(ImageDescription **desc, long type, long index)
  481.     = {0x203C,0xC,0x3A,0xAAA3};
  482.  
  483. pascal OSErr
  484. CountImageDescriptionExtensionType(ImageDescription **desc, long type, long *count)
  485.     = {0x203C,0xC,0x3B,0xAAA3};
  486.  
  487. pascal OSErr
  488. GetNextImageDescriptionExtensionType(ImageDescription **desc, long *type)
  489.     = {0x203C,0x8,0x3C,0xAAA3};
  490.  
  491. pascal OSErr
  492. FindCodec(CodecType cType,CodecComponent specCodec,
  493.         CompressorComponent *compressor,DecompressorComponent *decompressor)
  494.     = {0x7023,0xAAA3};
  495.  
  496. pascal OSErr
  497. CompressPicture(PicHandle srcPicture, PicHandle dstPicture,CodecQ quality,CodecType cType)
  498.     = {0x7024,0xAAA3};
  499.  
  500. pascal OSErr
  501. FCompressPicture(PicHandle srcPicture, PicHandle dstPicture,
  502.         short colorDepth, CTabHandle clut,CodecQ quality,
  503.         short doDither,short compressAgain,ProgressProcRecordPtr progressProc,
  504.         CodecType cType,CompressorComponent codec)
  505.     = {0x7025,0xAAA3};
  506.  
  507. pascal OSErr
  508. CompressPictureFile(short srcRefNum, short dstRefNum,CodecQ quality,CodecType cType)
  509.     = {0x7026,0xAAA3};
  510.  
  511. pascal OSErr
  512. FCompressPictureFile(short srcRefNum, short dstRefNum,short colorDepth, CTabHandle clut,
  513.     CodecQ quality, short doDither,short compressAgain,ProgressProcRecordPtr progressProc,
  514.     CodecType cType,CompressorComponent codec)
  515.     = {0x7027,0xAAA3};
  516.  
  517. pascal OSErr
  518. GetPictureFileHeader(short refNum,Rect *frame,OpenCPicParams *header)
  519.     = {0x7028,0xAAA3};
  520.  
  521. pascal OSErr
  522. DrawPictureFile(short refNum,const Rect *frame,ProgressProcRecordPtr progressProc)
  523.     = {0x7029,0xAAA3};
  524.  
  525. pascal OSErr
  526. DrawTrimmedPicture(PicHandle srcPicture,const Rect *frame,RgnHandle trimMask,short doDither,
  527.         ProgressProcRecordPtr progressProc)
  528.     = {0x702E,0xAAA3};
  529.  
  530. pascal OSErr
  531. DrawTrimmedPictureFile(short srcRefnum,const Rect *frame,RgnHandle trimMask,short doDither,
  532.         ProgressProcRecordPtr progressProc)
  533.     = {0x702F,0xAAA3};
  534.  
  535. pascal OSErr
  536. MakeThumbnailFromPicture(PicHandle picture,short colorDepth,PicHandle thumbnail,
  537.         ProgressProcRecordPtr progressProc)
  538.     = {0x702A,0xAAA3};
  539.  
  540. pascal OSErr
  541. MakeThumbnailFromPictureFile(short refNum,short colorDepth,PicHandle thumbnail,
  542.         ProgressProcRecordPtr progressProc)
  543. = {0x702B,0xAAA3};
  544.  
  545. pascal OSErr
  546. MakeThumbnailFromPixMap(PixMapHandle src,const Rect *srcRect,short colorDepth,PicHandle thumbnail,
  547.         ProgressProcRecordPtr progressProc)
  548. = {0x702C,0xAAA3};
  549.  
  550. pascal OSErr
  551. TrimImage(ImageDescriptionHandle desc,Ptr inData,long inBufferSize,DataProcRecordPtr dataProc,
  552.         Ptr    outData,long outBufferSize,FlushProcRecordPtr flushProc,Rect *trimRect,
  553.         ProgressProcRecordPtr progressProc)
  554.     = {0x702D,0xAAA3};
  555.  
  556. pascal OSErr
  557. ConvertImage(ImageDescriptionHandle srcDD,Ptr srcData,short colorDepth,CTabHandle clut,
  558.         CodecQ accuracy,CodecQ quality,CodecType cType,CodecComponent codec,
  559.         ImageDescriptionHandle dstDD,Ptr dstData)
  560.     = {0x7030,0xAAA3};
  561.  
  562. pascal OSErr
  563. GetCompressedPixMapInfo(PixMapPtr pix,ImageDescriptionHandle *desc,Ptr *data,long *bufferSize,
  564.     DataProcRecord *dataProc,ProgressProcRecord *progressProc)
  565.     = {0x7037,0xAAA3};
  566.  
  567. pascal OSErr
  568. SetCompressedPixMapInfo(PixMapPtr pix,ImageDescriptionHandle desc,Ptr data,long bufferSize,
  569.     DataProcRecordPtr dataProc,ProgressProcRecordPtr progressProc)
  570.     = {0x7038,0xAAA3};
  571.  
  572. pascal void
  573. StdPix(PixMapPtr src,const Rect *srcRect,MatrixRecordPtr matrix,short mode,
  574.     RgnHandle mask,PixMapPtr matte,const Rect *matteRect,short flags)
  575.      = {0x700C,0xAAA3};
  576.  
  577. pascal OSErr
  578. TransformRgn(MatrixRecordPtr matrix, RgnHandle rgn)
  579.     = {0x7039,0xAAA3};
  580.  
  581. /***********
  582.     preview stuff
  583. ***********/
  584.  
  585. pascal void SFGetFilePreview(Point where,
  586.                       ConstStr255Param prompt,
  587.                       FileFilterProcPtr fileFilter,
  588.                       short numTypes,
  589.                       SFTypeList typeList,
  590.                       DlgHookProcPtr dlgHook,
  591.                       SFReply *reply)
  592.  = {0x303C,0x41,0xAAA3};
  593.  
  594. pascal void SFPGetFilePreview(Point where,
  595.                        ConstStr255Param prompt,
  596.                        FileFilterProcPtr fileFilter,
  597.                        short numTypes,
  598.                        SFTypeList typeList,
  599.                        DlgHookProcPtr dlgHook,
  600.                        SFReply *reply,
  601.                        short dlgID,
  602.                        ModalFilterProcPtr filterProc)
  603.  = {0x303C,0x42,0xAAA3};
  604.  
  605. pascal void StandardGetFilePreview(FileFilterProcPtr fileFilter,
  606.                             short numTypes,
  607.                             SFTypeList typeList,
  608.                             StandardFileReply *reply)
  609.  = {0x303C,0x43,0xAAA3};
  610.  
  611. pascal void CustomGetFilePreview(FileFilterYDProcPtr fileFilter,
  612.                           short numTypes,
  613.                           SFTypeList typeList,
  614.                           StandardFileReply *reply,
  615.                           short dlgID,
  616.                           Point where,
  617.                           DlgHookYDProcPtr dlgHook,
  618.                           ModalFilterYDProcPtr filterProc,
  619.                           short *activeList,
  620.                           ActivateYDProcPtr activateProc,
  621.                           void *yourDataPtr)
  622.  = {0x303C,0x44,0xAAA3};
  623.  
  624. pascal OSErr MakeFilePreview(short resRefNum, ProgressProcRecordPtr progress)
  625.  = {0x303C,0x45,0xAAA3};
  626.  
  627. pascal OSErr AddFilePreview(short resRefNum, OSType previewType, Handle previewData)
  628.  = {0x303C,0x46,0xAAA3};
  629.  
  630. #ifdef __cplusplus
  631. }
  632. #endif /*__cplusplus*/
  633.  
  634. enum {
  635.     sfpItemPreviewAreaUser = 11,
  636.     sfpItemPreviewStaticText = 12,
  637.     sfpItemPreviewDividerUser = 13,
  638.     sfpItemCreatePreviewButton = 14,
  639.     sfpItemShowPreviewButton = 15
  640. };
  641.  
  642. typedef struct {
  643.     unsigned long    modDate;
  644.     short            version;
  645.     OSType            resType;
  646.     short            resID;
  647. } PreviewResourceRecord;
  648. typedef PreviewResourceRecord *PreviewResourcePtr,  **PreviewResource;
  649.  
  650. #ifdef __cplusplus
  651. extern "C" {
  652. #endif /*__cplusplus*/
  653.  
  654. pascal void
  655. AlignScreenRect(Rect *rp, AlignmentProcRecordPtr alignmentProc)
  656.     = {0x203C,0x8,0x4C,0xAAA3};
  657.  
  658. pascal void
  659. AlignWindow(WindowPtr wp, Boolean front, const Rect *alignmentRect, AlignmentProcRecordPtr alignmentProc)
  660.     = {0x203C,0xE,0x4D,0xAAA3};
  661.  
  662. pascal void
  663. DragAlignedWindow(WindowPtr wp, Point startPt, Rect *boundsRect, Rect *alignmentRect, AlignmentProcRecordPtr alignmentProc)
  664.     = {0x203C,0x14,0x4E,0xAAA3};
  665.  
  666. pascal long
  667. DragAlignedGrayRgn(RgnHandle theRgn, Point startPt, Rect *boundsRect,
  668.     Rect *slopRect, short axis, ProcPtr actionProc, Rect *alignmentRect, AlignmentProcRecordPtr alignmentProc)
  669.     = {0x203C,0x1E,0x4F,0xAAA3};
  670.  
  671. pascal OSErr
  672. SetCSequenceDataRateParams(ImageSequence seqID,DataRateParamsPtr params)
  673.     = {0x203C,0x8,0x50,0xAAA3};
  674.  
  675. pascal OSErr
  676. SetCSequenceFrameNumber(ImageSequence seqID, long frameNumber)
  677.     = {0x203C,0x8,0x51,0xAAA3};
  678.  
  679. pascal QDErr
  680. NewImageGWorld(GWorldPtr *gworld,ImageDescription **idh,GWorldFlags flags)
  681.     = {0x203C,0xC,0x52,0xAAA3};
  682.  
  683. pascal OSErr
  684. GetCSequenceDataRateParams(ImageSequence seqID,DataRateParamsPtr params)
  685.     = {0x203C,0x8,0x53,0xAAA3};
  686.  
  687. pascal OSErr
  688. GetCSequenceFrameNumber(ImageSequence seqID,long *frameNumber)
  689.     = {0x203C,0x8,0x54,0xAAA3};
  690.  
  691. pascal OSErr
  692. GetBestDeviceRect(GDHandle *gdh, Rect *rp)
  693.     = {0x203C,0x8,0x55,0xAAA3};
  694.  
  695. pascal OSErr
  696. SetSequenceProgressProc(ImageSequence seqID, ProgressProcRecord *progressProc)
  697.     = {0x203C,0x8,0x56,0xAAA3};
  698.  
  699. pascal OSErr
  700. GDHasScale(GDHandle gdh,short depth,Fixed *scale)
  701.     = {0x203C,0xA,0x5A,0xAAA3};
  702.  
  703. pascal OSErr
  704. GDGetScale(GDHandle gdh,Fixed *scale,short *flags)
  705.     = {0x203C,0xC,0x5B,0xAAA3};
  706.  
  707. pascal OSErr
  708. GDSetScale(GDHandle gdh,Fixed scale,short flags)
  709.     = {0x203C,0xA,0x5C,0xAAA3};
  710.  
  711. #ifdef __cplusplus
  712. }
  713. #endif /*__cplusplus*/
  714.  
  715.  
  716. enum {
  717.     identityMatrixType            = 0x00,        /* result if matrix is identity */
  718.     translateMatrixType            = 0x01,        /* result if matrix translates */
  719.     scaleMatrixType             = 0x02,        /* result if matrix scales */
  720.     scaleTranslateMatrixType    = 0x03,        /* result if matrix scales and translates */
  721.     linearMatrixType            = 0x04,        /* result if matrix is general 2 x 2 */
  722.     linearTranslateMatrixType    = 0x05,        /* result if matrix is general 2 x 2 and translates */
  723.     perspectiveMatrixType        = 0x06        /* result if matrix is general 3 x 3 */
  724. };
  725. typedef unsigned short MatrixFlags;
  726.  
  727.  
  728.  
  729. #ifdef __cplusplus
  730. extern "C" {
  731. #endif /*__cplusplus*/
  732. pascal short    GetMatrixType(MatrixRecord *m)
  733.         = {0x7014,0xABC2};
  734. pascal void        CopyMatrix(MatrixRecord *m1, MatrixRecord *m2)
  735.         = {0x7020,0xABC2};
  736. pascal Boolean    EqualMatrix(const MatrixRecord *m1, const MatrixRecord *m2)
  737.         = {0x7021,0xABC2};
  738.  
  739. pascal void        SetIdentityMatrix( MatrixRecord *matrix )
  740.         = {0x7015,0xABC2};
  741. pascal void        TranslateMatrix( MatrixRecord *m, Fixed deltaH, Fixed deltaV )
  742.         = {0x7019,0xABC2};
  743. pascal void        RotateMatrix( MatrixRecord *m, Fixed degrees, Fixed aboutX, Fixed aboutY )
  744.         = {0x7016,0xABC2};
  745. pascal void        ScaleMatrix( MatrixRecord *m, Fixed scaleX, Fixed scaleY, Fixed aboutX, Fixed aboutY )
  746.         = {0x7017,0xABC2};
  747. pascal void        SkewMatrix(MatrixRecord *m, Fixed skewX, Fixed skewY, Fixed aboutX, Fixed aboutY)
  748.         = {0x7018,0xABC2};
  749.  
  750. pascal OSErr    TransformFixedPoints(MatrixRecord *m, FixedPoint *fpt, long count)
  751.         = {0x7022,0xABC2};
  752. pascal OSErr    TransformPoints( MatrixRecord *mp, Point *pt1, long count )
  753.         = {0x7023,0xABC2};
  754. pascal Boolean    TransformFixedRect(MatrixRecord *m, FixedRect *fr, FixedPoint *fpp)
  755.         = {0x7024,0xABC2};
  756. pascal Boolean    TransformRect(MatrixRecord *m, Rect *r, FixedPoint *fpp)
  757.         = {0x7025,0xABC2};
  758.  
  759. pascal Boolean    InverseMatrix(MatrixRecord *m, MatrixRecord *im)
  760.         = {0x701C,0xABC2};
  761. pascal void        ConcatMatrix(MatrixRecord *a, MatrixRecord *b)
  762.         = {0x701B,0xABC2};
  763.  
  764. pascal void        RectMatrix(MatrixRecord *matrix,Rect *srcRect,Rect *dstRect)
  765.         = {0x701E,0xABC2};
  766. pascal void        MapMatrix(MatrixRecord *matrix,Rect *fromRect,Rect *toRect)
  767.         = {0x701D,0xABC2};
  768.  
  769. #ifdef __cplusplus
  770. }
  771. #endif /*__cplusplus*/
  772.  
  773.  
  774. #endif /*__IMAGECOMPRESSION__*/
  775.